Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODPersistentObject


GetStorageUnit

The GetStorageUnit method returns a reference to the storage unit in which this persistent object stores its data.

ODStorageUnit GetStorageUnit ();
return value
A reference to the storage unit of this persistent object, or kODNULL if the object does not have a storage unit.
DISCUSSION
Whenever your part calls this method, it should check that the return value is non-null before attempting to use the storage unit because nonpersistent frames, which do not have storage units, may be added to your part.

You should never cache a reference to the returned storage unit; instead you must call this method whenever you access the storage unit. This method does not increment the reference count of the returned storage unit.

SEE ALSO
"The Externalize Method" on page 297 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help